package com.hxlc.dao;

import com.hxlc.pojo.EquipmentInfoDetailsEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface EquipmentInfoDetailsDao extends JpaRepository<EquipmentInfoDetailsEntity,String>{

    @Query("select e from EquipmentInfoDetailsEntity e where e.equipmentInfoId in (:eInfoIds)")
    List<EquipmentInfoDetailsEntity> getByEquipmentInfoIds(@Param("eInfoIds") List<String> ids);

    @Query("select e from EquipmentInfoDetailsEntity e where e.equipmentInfoId in (:eInfoIds) and e.metric= :metric")
    List<EquipmentInfoDetailsEntity> getByEquipmentInfoIdsAndMetric(@Param("eInfoIds") List<String> ids, @Param("metric") String metric);
}
